<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json"%>

<script type="text/javascript">
	var GLOBAL_storeCreate = new StoreCreate();
	$(document).ready(function() {
		// init content
		GLOBAL_storeCreate.init();
	});

	function StoreCreate() {
		var _this = this;
		var _settings = null;

		this.init = function(settings) {

		};

		this.callStoreType = function() {
			var settings = {

			};
			Call(settings);
		};

		this.callStoreType = function() {
			var settings = {

			};
			Call(settings);
		};

		this.create = function() {
			var data = {
				"model.name" : $("#storeName").val(),
				"model.type" : $("#storeType").val(),
				"model.status" : $("#storeStatus").val(),
				"model.description" : $("#storeDescr").val()
			};

			var settings = {
				"body" : $('#formSubmit'),
				"url" : "createStore",
				"params" : data,
				"responseFunc" : _this.responseCall
			};
			Call(settings);
			// validation;
			return true;
		};

		this.responseCall = function() {
			GLOBAL_storeMain.callList();
		};
	}
</script>

<div>
	<div class="top-box-msg">
		<span>All fields with * are required! </span>
	</div>
	<div class="left">
		<div class="img-box">
			<img src="" alt="Store IMG" title="" />
		</div>

	</div>
	<div class="right" style="min-width: 72%;">
		<s:form action="#" id="formSubmit">
			<table class="table-grid">
				<col width="" />
				<col width="" />
				<tr>
					<td class="tdR"><label>Name:</label><span
						style="color: #F62217;">&#160;*</span></td>
					<td><input type="text" id="storeName" class="required"
						size="50" /></td>
				</tr>
				<tr>
					<td class="tdR"><label>Type:</label><span
						style="color: #F62217;">&#160;*</span></td>
					<td><select id="storeType" class="required">
							<option>Web store</option>
							<option>Store</option>
					</select></td>
				</tr>
				<tr>
					<td class="tdR"><label>Status:</label><span
						style="color: #F62217;">&#160;*</span></td>
					<td><select id="storeStatus" class="required">
							<option>Open</option>
							<option>In process</option>
							<option>Planned</option>
					</select></td>
				</tr>
				<tr valign="top">
					<td class="tdR"><label>Description:</label></td>
					<td><textarea id="storeDescr" cols="48" rows="2"></textarea></td>
				</tr>
			</table>
		</s:form>
	</div>
</div>
